from torch.utils import tensorboard
import numpy as np

writer = {
    'loss': tensorboard.SummaryWriter("./drive/MyDrive/logs/loss"),  # 必须要不同的writer
    'acc': tensorboard.SummaryWriter("./drive/MyDrive/logs/acc"),
    'lr': tensorboard.SummaryWriter("./drive/MyDrive/logs/lr")
}

data = np.random.random((3, 10))  # 生成模拟数据

loss_data = data[0]
acc_data = data[1]
lr_data = data[2]
c = 2
for i in range(10):
    writer['loss'].add_scalar("data", loss_data[i], i)  # 要想显示在一张图 表格名字要一样！！

    writer['lr'].add_scalar("data", lr_data[i], i)

    a = 1
    b = 2
    a = 1
    b = 2
    a = 1
    b = 2
    b = 2
    b = 2

writer['loss'].close()
writer['acc'].close()
writer['lr'].close()
exit()

abs()